local CORDON = Class(function(self, inst)
    self.inst = inst
    self.cordon = false
end)

-- 保存
function CORDON:OnSave()
    if self.cordon then
        return { cordon = self.cordon }
    end
end

-- 载入
function CORDON:OnLoad(data)
    if data and data.cordon then
        self.cordon = data.cordon
    end
    if self.cordon == true then
        if self.inst and self.inst.prefab == "cave_entrance_open" then
            local stone = SpawnPrefab("sw_infernal_stone")
            -- stone.entity:SetParent(self.inst.entity)
            self.inst:AddChild(stone)
            stone.Transform:SetPosition(0, 0, 0)
        end
    end
end

return CORDON
